export default {
	
	// 用来存放数据的对象
	state:{
		// 初始值
		username: '',
		code: '',
		isLogin:false,
		

	},
	
	// 定义取数据
	getters:{
		username:function(state){
			return state.username;
		},
		code:(state)=>{
			return state.code
		},
		isLogin:(state)=>{
			return state.isLogin
		},

	},
	mutations: {
			username: (state,payload)=>{
				state.username = payload;
			},
			code: (state,payload)=>{
				state.code = payload;
			},	
			isLogin: (state,payload)=>{
				state.isLogin = payload;
			},	

		},
	actions:{
		username: ({commit},payload)=>{
			commit('username',payload)
		},
		code: ({commit},payload)=>{
			commit('code',payload)
		},	
		isLogin: ({commit},payload)=>{
			commit('isLogin',payload)
		},	
	}

}
